package com.itts.common.entity;

import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Objects;

@Accessors(chain = true)
@Data
public class User {

    private String name;

    private Integer age;

    private String is;

    public User() {
    }

    public User(String name, Integer age, String is) {
        this.name = name;
        this.age = age;
        this.is = is;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getIs() {
        return is;
    }

    public void setIs(String is) {
        this.is = is;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(name, user.name) &&
                Objects.equals(age, user.age) &&
                Objects.equals(is, user.is);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age, is);
    }
}
